//
//  YSCartBusinessHeaderView.m
//  Yueshi
//
//  Created by Northwan on 15/7/27.
//  Copyright (c) 2015年 悦食中国. All rights reserved.
//

#import "YSCartBusinessHeaderView.h"

@interface YSCartBusinessHeaderView()

@property (weak, nonatomic) IBOutlet UIImageView *logoView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@end

@implementation YSCartBusinessHeaderView

+(instancetype)headerView{
    return [[[NSBundle mainBundle ]loadNibNamed:@"YSCartBusinessHeaderView" owner:nil options:nil]lastObject];
}

-(void)setSupplier:(YSSupplier *)supplier{
    _supplier = supplier;
    
    [self.logoView setImageURLStr:supplier.logo];
    [self.nameLabel setText:supplier.supplierName];
    [self.statusBtn setSelected:supplier.status];
}

- (IBAction)tapChoose:(id)sender {
    [self.statusBtn setSelected:!self.statusBtn.selected];
}

@end
